/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase - Student
 * <p>Powered by webrx On 2021-12-08 15:51:37
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Student {
    private int id;
    private String name;
    private String sex;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) throws SexException, Exception {
        if ("男".equals(sex) || "女".equals(sex)) {

        } else {
            throw new SexException("10性别设置错误");
        }
        this.sex = sex;
    }
}
